home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
netbsd
/
contrib
/
easyinstall-1.3s.readme
< prev
next >
Wrap
Text File
|
1995-10-22
|
11KB
|
273 lines
Descr: Solaris-version of EasyInstall (no, doesn't really belong here,
but i couldn't think of a better place ;-)
Using and making optional packages available for Solaris
########################################################
(C) Hubert Feyrer, Juny 14th, 1995
Summary:
~~~~~~~~
This document describes how optional packages should be
structured so they can be easily installed and removed.
Furthermore, a method for simplifying the installation
is introduced and hints on how to configure optional
packages are included.
0) Contents
~~~~~~~~~~~
0. Contents
1. Introduction
1.1 Format of packages
1.2 Accessing packages easily
1.3) Other things to do while installing packages
2. The installation process
2.1 Things done while installing
2.2 Things done while uninstalling
3. Configuring the installation process
4. A note on configuring packages
5. Additional thingies
6. Future plans
7. Disclaimer & legal stuff
8. Availability
9. Final note
1) Introduction
~~~~~~~~~~~~~~~
As stated in an earlier posting, I'd like to see all optional packages
reside in their own directory below one common directory (/usr/local).
Packages are placed in subdirectories below /usr/local, with the directory
name of the package giving name and version of the package,
e.g. /usr/local/fvwm-1.23f, /usr/local/bash-1.14.1.
1.1) Format of packages
~~~~~~~~~~~~~~~~~~~~~~~
Below the package-directories, files are stored in the following
subdirectories:
- binaries: bin
- formatted man-pages: man/cat[1-8nl]
- unformatted man-pages: man/man[1-8nl]
- misc files: etc
- libraries: lib
- includes: include
- info-files: info
Information for installing the package is provided in the subdirectory
"install", namely as a script "install.sh" for installation and
(recommended) "uninstall.sh" for removing the package.
1.2) Accessing packages easily
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Having several packages installed would force users to include serveral
bin-directories into their $PATH, get unwieldly long $MANPATHs, ... To
prevent this, files that are accessed by users are linked to some public
directories below /usr/local. The directories used are exactly the same as
the ones used inside the packages. Doing this has two advantages:
- easy installation of packages
- users have to include only one directory into their $PATH
(/usr/local/bin), $MANPATH (/usr/local/man), ...
This document is intended to describe a mechanism for making packages
accessible via those public directories.
1.3) Other things to do while installing packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are also some more things to handle when installing packages,
namely:
- installing X application defaults
- making files setuid root
- creating auxiliary directories (for more libraries, includes, ...)
- Pre/Post-install scripts (not yet)
2) The installation process
~~~~~~~~~~~~~~~~~~~~~~~~~~~
I've written some shell scripts that should help installing optional
(precompiled) packages on ones system by doing the things mentioned
above. All one has to do to configure the installation is to set some
variables in a (shell)script that will be uses for installation as
well as de-installation.
2.1) Things done while installing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The "install.sh"-script does the following things while making a package
publically available:
a) If application defaults are to be installed, figure out the directory
where to put them. The following directories are searched:
- /usr/lib/X11/app-defaults
- /usr/local/X11R6/lib/X11/app-defaults
- /usr/X11R6/lib/X11/app-defaults
- /usr/local/X11R5/lib/X11/app-defaults
- /usr/X11R5/lib/X11/app-defaults
- $BASE/X11R6/lib/X11/app-defaults
- $BASE/X11R5/lib/X11/app-defaults
(BASE is the directory below which packages are installed, usually
/usr/local, but can be changed, although this is not recommended)
*NOTE: Use of this feature is not very useful if you plan on
upgrading your window-system or if you use several
window-systems concurrently (e.g. OpenWindows & MIT
X11). Make a shell-wrapper setting $XENVIRONMENT instead!
If no directory can be found, the user will be prompted to insert on.
b) Create /usr/local and additional directories (for includes, libraries,
...).
c) Link files specified from /usr/local/<package>/bin to /usr/local/bin.
Same for files in etc, lib, man/man[1-8nl], man/cat[1-8nl], info and
include. Directories that do not exist will be created.
d) Install X application defaults into the directory previously figured
out.
e) Set specified files setuid root.
2.2) Things done while uninstalling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"uninstall.sh" performs the following tasks while removing the package from
public directories:
a) Find out directory for application defaults as described above.
b) Remove files from public directories: bin, etc, lib, man/man[1-8nl],
man/cat[1-8nl], info, include. After that, directories will be removed if
they are empty.
c) The X application default file is removed.
d) Remove misc directories for libraries, etc.
Please note: the package itself (/usr/local/<package>) is *not* removed!
3) Configuring the installation process
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The two scripts "install.sh" and "uninstall.sh" are expected to be placed
in a packages "install" subdirectory. This is also the place where the two
scripts look for a file "package" which describes the package.
The packag-file contains only definitions for some (environment) variables,
namely:
- BASE: Base of public directories. Defaults to "/usr/local" and should not
be changed.
- PKG: Absolute patch of the package, usually "$BASE/package-name".
- BIN: Which files to link from $PKG/bin to $BASE/bin. Must be enclosed in
"quotes" if more than one file is given (space-seperated).
- ETC: Which files from $PKG/etc will be needed in $BASE/etc? (Note: You
should compile in /usr/local/packagename as base for packages, not
/usr/local. This way you won't have to link files into
/usr/local/etc.)
- LIB: Libraries of public interrest, relative to $PKG/lib. Additional
libraries can be created by setting MISCDIRS (see below).
- MAN1: which unformatted man-pages to link from $PKG/man/man1 to
$BASE/man/man1 (including ".1"-suffix!). Descriptions for general
commands go here.
- MAN2: same as MAN1 (suffix: ".2"), just for system calls.
- MAN3: same as MAN1 (suffix: ".3"), just for C libraries.
- MAN4: same as MAN1 (suffix: ".4"), just for device drivers.
- MAN5: same as MAN1 (suffix: ".5"), just for file formats.
- MAN6: same as MAN1 (suffix: ".6"), just for games.
- MAN7: same as MAN1 (suffix: ".7"), just for miscellaneous things that
don't fit else where.
- MAN8: same as MAN1 (suffix: ".8"), just for system administrative
commands.
- MANN: same as MAN1 (suffix: ".n"), just for more misc (new) stuff
- MANL: same as MAN1 (suffix: ".l"), just for local software
- CAT1: which formatted man-pages to link from $PKG/man/cat1 to
$BASE/man/cat1 (including ".0"-suffix!). Descriptions for general
commands go here.
- CAT2: same as CAT1 (suffix: ".0"), just for system calls.
- CAT3: same as CAT1 (suffix: ".0"), just for C libraries.
- CAT4: same as CAT1 (suffix: ".0"), just for device drivers.
- CAT5: same as CAT1 (suffix: ".0"), just for file formats.
- CAT6: same as CAT1 (suffix: ".0"), just for games.
- CAT7: same as CAT1 (suffix: ".0"), just for miscellaneous things that
don't fit else where.
- CAT8: same as CAT1 (suffix: ".0"), just for system administrative commands.
- CATN: same as CAT1 (suffix: ".0"), just for more misc (new) stuff
- CATL: same as CAT1 (suffix: ".0"), just for local software
- INFO: files to link to $BASE/info. Modification of "$BASE/info/dir"
should be done by some smart post-processing script (once these are
implemented ;-).
- APPDEF: Application default files, relative to $PKG, usually
"lib/XApp.ad". Suffix ".ad" will be stripped in link.
- INCLUDE: Files to link into $BASE/include, e.g. for libraries like
readline. Additional subdirectories can be created by setting
MISCDIRS.
- SUIDROOT: Which files (relative to $PKG) to make setuid-root (just in
case tar goofed some protections/ownerships).
- MISCDIRS: Which additional directories to create under $BASE. Usually for
grouping includes or libraries.
4.) A note on configuring packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When compiling optional packages, make the base-directory
"/usr/local/package", not "/usr/local". By doing so you don't have to put
every single file into public directories, but only the ones of interrest
for users (usually binaries and man pages).
5. Additional thingies
~~~~~~~~~~~~~~~~~~~~~~
installedSW.pl.cgi - perl-scribt to create a WWW-page with list of
installed software (what did you expect by that name?! ;-)
6.) Future plans
~~~~~~~~~~~~~~~~
There are some things I can think of that might be useful:
- Pre/Post-install-scripts which will be run before/after the installation
to backup files, etc.
- Some smart script to edit config-files. Useful for adding info-files to
the dir-file or think if one wants to install wu-ftpd: editing
/etc/inetd.conf by hand. :-/
- Merge NetBSD- and Solaris-version >:)
7.) Disclaimer & legal stuff
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use at your own risk. All rights reserved. I take no responsibility for
nothing. Note also (c) copyright-message in the scripts themselves:
# (c) Copyright 1994, 1995 Hubert Feyrer.
# Alle Rechte vorbehalten, weitergabe an Dritte ohne schriftliche
# Genehmiging des o.g. Autors ausdruecklich untersagt!
# All rights reserved, distribution of this software without a written
# permission of the author is hereby strictly forbidden!
8.) Availability
~~~~~~~~~~~~~~~~
I'll put this all together into a package "EasyInstall-1.3S.tar.gz" and place
it into /pub/NetBSD-Amiga/contrib on ftp.uni-regensburg.de.
9.) Final note
~~~~~~~~~~~~~~
Call for discussion!
What do you think about all of this? Are the two scripts useful, will
anyone use it? What can be improved? How about the method for detecting the
appdef-dir? Are there any public directories I've missed?
Enjoy,
Hubert
=============== Hubert Feyrer ============================================
Weekdays: Rennerstr. 19, D-93053 Regensburg, Tel. 0941/943-2455
Weekends: Bachstr. 40, D-84066 Mallersdorf, Tel. 08772/6084
Internet: hubert.feyrer@rz.uni-regensburg.de == IRC: hubertf
==========================================================================